import request from '@/utils/request'
import ConstTable from './ConstTable'


// 获取供应商分类分类信息
export function GetList(data)
{
    return request({
        url: `${ConstTable.BaseUrl}/BaseData/supplierClassification/`,
        method: 'GET',
        data
    })
}

// 获取供应商分类详细信息
export function GetInfoFy(id)
{
    return request({
        url: `${ConstTable.BaseUrl}/BaseData/supplierClassification/${id}`,
        method: 'GET'
    })
}

// 添加供应商分类信息
export function CreateSupplierClassification(data)
{
    return request({
        url: `${ConstTable.BaseUrl}/BaseData/supplierClassification`,
        method: 'POST',
        data
    })
}

// 更新供应商分类信息
export function updateSupplierClassification(data)
{
    return request({
        url: `${ConstTable.BaseUrl}/BaseData/supplierClassification/${data.id}`,
        method: 'PUT',
        data
    })
}

// 批量删除供应商分类信息
export function delupdateSupplierClassificationBatch(data)
{
    return request({
        url: `${ConstTable.BaseUrl}/BaseData/supplierClassification/BatchRemove`,
        method: 'POST',
        data
    })
}
// 删除供应商分类信息
export function deleteSupplierClassification(id)
{
    return request({
        url: `${ConstTable.BaseUrl}/BaseData/supplierClassification/${id}`,
        method: 'DELETE'
    })
}

// 导出供应商分类信息
export function exportDataApi(data)
{
    return request({
        url: `${ConstTable.BaseUrl}/BaseData/supplierClassification/Actions/Export`,
        method: 'GET',
        data
    })
}

// 导入供应商分类信息
export function ImportData(data)
{
    return request({
        url: `${ConstTable.BaseUrl}/BaseData/supplierClassification/ImportData`,
        method: 'post',
        data
    })
}
// 导入预览
export function ImportPreview(data)
{
    return request({
        url: `${ConstTable.BaseUrl}/BaseData/supplierClassification/ImportPreview`,
        method: 'get',
        data
    })
}
// 模板下载
export function TemplateDownload()
{
    return request({
        url: `${ConstTable.BaseUrl}/BaseData/supplierClassification/TemplateDownload`,
        method: 'get'
    })
}
